package com.cxmx.escort.base;/**
 * @ClassName:MyException
 * @Description //TODO
 * @Author chenyunxuan
 * @Date $ $
 **/


import lombok.Getter;
import lombok.Setter;


/**
 * spring 对于 RuntimeException 异常才会进行事务回滚。
 *
 * @author sxd
 * @since 2018/4/1
 */
@Getter
@Setter
public class MyException extends RuntimeException {

    public MyException(Integer code, Exception exception) {
        this.code = code;
        this.exception = exception;
    }

    private Integer code;
    private Exception exception;
}